package com.yneusoft.dao.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 部门信息表(Department)实体类
 *
 * @author makejava
 * @since 2021-11-23 20:56:31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("`department`")
public class Department implements Serializable {
    /**
     * 自增aid
     */
    @TableId(type = IdType.AUTO)
    private Integer aid;
    /**
     * 编号
     */
    private String code;
    /**
     * 名称
     */
    private String name;
    /**
     * 状态id
     */
    private Integer stateId;
    /**
     * 状态名称(冗余)
     */
    private String stateName;
    /**
     * 父级部门aid
     */
    //修改时可以修改父部门为null
    private Integer fatherAid;
    /**
     * 层级
     */
    private Integer level;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}

